1 REM PROGRAM TITLE: POINT A TO POINT B
2 XSONG$ = "ML T200 A B C D E F G F E D C B A A A CCC L4 E L8 D"
3 PLAY XSONG$
5 CLEAR 300
6 C = INT(RND * 14 + 1)
7 B = INT(RND * 14 + 1)
8 O = INT(RND * 14 + 1)
10 V$ = RIGHT$(TIME$, 2)
15 V = VAL(V$)
20 RANDOMIZE V: DIM SONG$(13)
30 COLOR C, B, O: CLS : KEY OFF: WIDTH 40: DEF SEG = &HB800
40 PRINT TAB(15); "<FROM POINT A>": SOUND 500, 3
50 PRINT TAB(15); "<TO POINT B>": SOUND 600, 3
60 PRINT : DIM D$(50), S(50)
70 SOUND 700, 3: INPUT "INSTRUCTIONS (Y/N)"; W$
80 IF W$ = "N" OR W$ = "NO" THEN G = 1
90 SOUND 500, 3: INPUT "NUMBER TO PLAY (1-10)"; A
100 IF A < 1 OR A > 10 THEN 90
110 IF G = 1 THEN G = 0: GOTO 410
120 PLAY "MB L8 F E F A C": LOCATE 3, 1: PRINT "ARE YOU CONFUSED BY THE MANY"
130 PRINT "DIFFERENT MAZE GAMES THAT ARE"
140 PRINT "CURRENTLY ON THE MARKET? HAVE"
150 PRINT "NO FEAR!! <FROM POINT A TO"
160 PRINT "POINT B> IS HERE!!"
170 PRINT : PRINT "ACTUALLY, THIS IS NOT YOUR"
180 PRINT "RUN-OF-THE-MILL MAZE GAME."
190 PRINT "IT IS ONE THAT WILL PROBABLY"
200 PRINT "CONFUSE YOU MORE THAN EVER!"
210 PRINT "YOU SEE, YOU WILL NOT BE"
220 PRINT "CONSTANTLY PRESSING DIFFERENT"
230 PRINT "KEYS FOR DIFFERENT DIRECTIONS;"
240 PRINT "INSTEAD, YOU'LL INPUT ALL"
250 PRINT : INPUT "PRESS ENTER TO CONTINUE"; W
260 CLS
270 PLAY "MB L8 C C+ D E F": PRINT "OF THE INSTRUCTIONS BEFORE YOU"
280 PRINT "MOVE AT ALL: UP SO MANY"
290 PRINT "SPACES, RIGHT SO MANY SPACES,"
300 PRINT "LEFT, SO MANY, ETC., ETC."
310 PRINT "AFTER YOU HAVE ENTERED ALL"
320 PRINT "OF YOUR DIRECTION INSTRUCTIONS"
330 PRINT "YOU WILL INPUT <XX>. AT THAT"
340 PRINT "POINT YOUR PIECE WILL BEGIN"
350 PRINT "TO MOVE FOLLOWING THE INSTRUCTIONS"
360 PRINT "YOU GAVE. IF AT ANY POINT YOU"
370 PRINT "COLLIDE WITH ANYTHING OTHER"
380 PRINT "THAN A BLANK SPACE--END OF TURN..."
390 PRINT
400 INPUT "PRESS ENTER, AGAIN"; W
410 CLS
420 REM PLAYERS
430 REM PLAY IN ORDER OF ENTRY
440 SOUND 500, 3: PRINT "ENTER THE FIRST NAMES OF"
450 PRINT "THE"; A; "PLAYERS, PLEASE"
460 FOR I = 1 TO A: INPUT A$(I): SOUND 100 + 25 * I, 3
470 NEXT: L = 1: MX = 0
480 PRINT
490 PRINT "TO BEGIN, "; A$(L); ", PRESS ENTER";
500 INPUT W
510 REM GRAPHICS AND MUSIC
515 FOR I = 1 TO 13: NEXT
520 CLS : SNG = 1: PLAY XSONG$: GOTO 580
560 LOCATE 1, 1: PRINT STRING$(40, 32); : RETURN
565 DC = INT(RND * 6 + 25): DR = 2
570 LOCATE DR, DC: PRINT STRING$(2, 32); : RETURN
580 GOSUB 560: LOCATE 8, 2: PRINT STRING$(9, 219)
590 LOCATE 8, 18: PRINT STRING$(9, 219); : GOSUB 620
600 LOCATE 8, 22: PRINT STRING$(14, 219)
605 DC = INT(RND * 7 + 30): DR = 6
610 LOCATE DR, DC: PRINT STRING$(2, 32); : RETURN
620 GOSUB 700: M = 10: M1 = 20: M2 = 6: M3 = 12: GOTO 670
630 SNG = SNG + 1: IF SNG <= 13 THEN PLAY XSONG$
631 IF M2 <= 0 THEN M2 = INT(RND * 4 + 2)
632 IF M2 >= 32 THEN M2 = INT(RND * 10 + 13)
633 IF M1 <= 0 THEN M1 = INT(RND * 10 + 1)
634 IF M1 >= 40 THEN M1 = 38
635 FOR X = M TO M1: LOCATE M2, X: PRINT CHR$(219)
637 DR = 8: DC = INT(RND * 10 + 10): FR = 11: FC = INT(RND * 10 + 20)
638 LOCATE DR, DC: PRINT STRING$(10, 219): LOCATE FR, FC: PRINT STRING$(10, 219)
639 FOR ROW = 12 TO 14: COL = INT(RND * 25 + 1): GAP = INT(RND * 15 + 1): LOCATE ROW, COL: PRINT STRING$(GAP, 32): NEXT: LOCATE 8, COL: PRINT STRING$(GAP, 32)
640 LOCATE M3, X: PRINT CHR$(219): NEXT: FOR X = M2 + 1 TO M3 - 2
650 LOCATE X, M: PRINT CHR$(219): LOCATE X, (M + 1): PRINT CHR$(219): LOCATE X, (M1 - 1): PRINT CHR$(219)
660 LOCATE X, M1: PRINT CHR$(219): NEXT: RETURN
670 GOSUB 630
680 M = 1: M1 = 5: M2 = 12: M3 = 16: GOSUB 630
690 M = 6: M1 = 9: GOSUB 630
700 M = M1 + 1: M1 = M1 + 22: M2 = M3 - 2: M3 = M3 + 6
710 GOSUB 630
720 M = M1 + 1: M1 = M1 + 9: M2 = M2 + 6: M3 = M3 + 6
730 GOSUB 630
740 M = 1: M1 = 9: GOSUB 630: GOTO 770
750 LOCATE 20, 10: PRINT STRING$(25, 219)
752 LOCATE 12, 30: PRINT STRING$(8, 219)
755 DC = INT(22 * RND + 10): DR = 20
758 FC = INT(6 * RND + 31): FR = 12
760 LOCATE DR, DC: PRINT STRING$(2, 32)
765 LOCATE FR, FC: PRINT STRING$(2, 32); : RETURN
770 GOSUB 750: M1 = M1 - 3: M2 = M3 + 2: M3 = M3 + 6
775 GOSUB 630
780 M = M1 + 1: M1 = M1 + 4
790 GOSUB 630
800 IF M >= 38 THEN 880
810 GOTO 780
820 M = M - 5: M1 = M + 3: M2 = 2: M3 = 10
830 GOSUB 630
840 M = M - 4: M1 = M + 1: M2 = M3 + 2: M3 = M3 + 8
850 GOSUB 630
860 M = M - 5: M1 = M1 + 1: M2 = 4: M3 = 6
870 GOSUB 630: RETURN
880 REM START/STOP LOCATIONS
890 GOSUB 820: Y = 21: X2 = 40
900 X1 = INT(RND * (X2 - 1) + 2)
1000 IF G = 1 THEN 1110
1010 COLOR 11: LOCATE 23, 5: PRINT "THIS IS POINT A (START)."
1020 LOCATE Y, X1: PRINT CHR$(32): LOCATE Y, (X1 - 1): PRINT CHR$(32)
1030 FOR T = 1 TO 50: NEXT
1040 COLOR 27: LOCATE Y, X1: PRINT CHR$(219)
1050 FOR T = 1 TO 50000: NEXT T
1060 COLOR 11: LOCATE Y, X1: PRINT CHR$(219)
1070 IF G = 1 THEN 1150 ELSE JJ = X1
1080 G = 1
1090 LOCATE 23, 5: PRINT "LOOK AT THE TOP (POINT B)"
1100 Y = 1: X2 = 30: GOTO 900
1110 LOCATE 23, 5: PRINT STRING$(35, 32)
1130 LOCATE 23, 5: PRINT "THIS IS POINT B (STOPPING ZONE)."
1140 R = X1: GOTO 1020
1150 LOCATE 23, 5: PRINT STRING$(35, 32)
1160 GOTO 1210
1170 LOCATE 23, 5: PRINT STRING$(35, 32): LOCATE 23, 5
1180 RETURN
1190 FOR T = 1 TO 2000: NEXT
1200 GOSUB 1170: RETURN
1210 GOSUB 1170
1220 PRINT "YOU WILL NOW GIVE INSTRUCTIONS:"
1225 FOR T = 1 TO 1000: NEXT T
1230 GOSUB 1190: GOSUB 1170
1240 PRINT "TO ENTER THE STOP ZONE..."
1245 FOR T = 1 TO 10000: NEXT T
1250 GOSUB 1190: GOSUB 1170
1260 PRINT "STOP BLOCK MUST BE HIT:"
1270 GOSUB 1190: GOSUB 1170
1280 PRINT "HEAD ON TO COMPLETE A RUN."
1290 GOSUB 1190: GOSUB 1170
1300 I = 1
1310 INPUT "DIRECTION (L,R,U,D)"; D$: SOUND 500, 3
1320 IF D$ = "XX" THEN 1380
1325 IF D$ = "Q" THEN 2350
1330 D$(I) = D$: GOSUB 1170
1340 INPUT "FOR HOW MANY SPACES"; S: SOUND 500, 3
1350 S(I) = S: I = I + 1: GOSUB 1170
1360 IF I >= 51 THEN 1430
1370 GOSUB 1200: GOSUB 1170: GOTO 1310
1380 GOSUB 1170
1390 PRINT "THE COMPUTER WILL NOW CARRY"
1395 FOR T = 1 TO 10000: NEXT T
1400 GOSUB 1190: GOSUB 1170
1410 PRINT "OUT ALL OF YOUR INSTRUCTIONS."
1420 I = I - 1: H = I: I = 1: X = JJ: Y = 21: G = 0
1425 GOSUB 1190: GOTO 1480
1430 GOSUB 1170
1440 PRINT "THAT IS THE LIMIT OF THE"
1450 GOSUB 1190: GOSUB 1170
1460 PRINT "INSTRUCTIONS YOU CAN ENTER."
1470 GOSUB 1190: GOTO 1380
1480 D$ = D$(I): S = S(I): J = 1: IF I <= 12 THEN PLAY XSONG$(I)
1490 IF D$ = "L" THEN 1540
1500 IF D$ = "R" THEN 1580
1510 IF D$ = "U" THEN 1620
1520 IF D$ = "D" THEN 1660
1530 GOTO 1760  'BAD DIRECT
1540 IF PEEK((X - 2) * 2 + (Y - 1) * 80) = 219 THEN 1760
1550 X = X - 1: LOCATE Y, X + 1: PRINT CHR$(32)
1560 IF X <= 0 THEN 1760
1570 GOTO 1690
1580 IF PEEK(X * 2 + (Y - 1) * 80) = 219 THEN 1760
1590 X = X + 1: LOCATE Y, (X - 1): PRINT CHR$(32)
1600 IF X >= 40 THEN 1760
1610 GOTO 1690
1620 IF PEEK((X - 1) * 2 + (Y - 2) * 80) = 219 THEN 1760
1630 Y = Y - 1: LOCATE (Y + 1), X: PRINT CHR$(32)
1640 IF Y <= 0 THEN 1760
1650 GOTO 1690
1660 IF PEEK((X - 1) * 2 + Y * 80) = 219 THEN 1760
1670 Y = Y + 1: LOCATE (Y - 1), X: PRINT CHR$(32)
1680 IF Y >= 20 THEN 1760
1690 COLOR 11: LOCATE Y, X: PRINT CHR$(2) 'MAKE CARACTER
1700 IF S > J THEN 1720
1710 GOTO 1730
1720 J = J + 1: GOTO 1490
1730 I = I + 1
1740 IF I > H THEN HH = 1: GOTO 1900
1750 GOTO 1480
1760 GOSUB 1170: IF ABS(X - R) <= 1 THEN 2060
1770 PRINT "SORRY...YOU HAVE ATTEMPTED"
1780 GOSUB 1190: GOSUB 1170
1790 PRINT "A SHORT-CUT THAT DIDN'T WORK."
1800 REM ANOTHER PLAY?
1810 GOSUB 1190
1820 GOTO 1950
1830 GOSUB 1190: GOSUB 1170
1840 PRINT "READY TO TRY AGAIN (Y/N)";
1850 INPUT W$
1860 IF W$ = "Y" THEN 1880
1870 GOTO 2300
1880 LOCATE Y, X: PRINT CHR$(32): LOCATE 1, R: PRINT CHR$(32)
1890 GOTO 1960
1900 GOSUB 1170
1910 PRINT "THAT WASN'T ENOUGH TO GET "
1920 GOSUB 1190: GOSUB 1170
1930 PRINT "TO GET YOU TO THE STOP ZONE, "; A$(L)
1940 GOTO 1800
1950 REM PLAYER ADVANCE
1960 IF L >= A THEN 2020 ELSE L = L + 1
1970 GOSUB 1170
1980 PRINT A$(L); " WILL NOW ATTEMPT THE"
1990 GOSUB 1190: GOSUB 1170
2000 PRINT "VENTURE FROM POINT A TO POINT B."
2005 LOCATE Y, X: PRINT CHR$(32)
2010 GOSUB 600: GOSUB 750: M = 35: M1 = 38
2015 GOSUB 1190: GOTO 880
2020 REM START OVER
2030 L = 1: GOSUB 1170
2040 PRINT "ALL HAVE PLAYED..."
2050 GOSUB 2160: MX = 0: GOTO 1830
2060 IF ABS(Y - 1) >= 1 THEN 1900
2070 GOSUB 1190: GOSUB 1170: REM COMPLETE
2080 PRINT "VERY WELL DONE, "; A$(L); "!!"
2090 GOSUB 1190: GOSUB 1170
2100 PRINT "YOU HAVE MADE A COMPLETE "
2110 GOSUB 1190: GOSUB 1170
2120 PRINT "PASSAGE TO POINT B..."
2130 GOSUB 1190
2140 M(L) = 1: MX = 1
2150 GOTO 1950
2160 REM PLAYERS MADE TO POINT B
2170 IF MX = 0 THEN RETURN
2180 GOSUB 1190: GOSUB 1170
2190 PRINT "THE FOLLOWING HAVE EASILY MADE"
2200 GOSUB 1190: GOSUB 1170
2210 PRINT "TO POINT B...."
2220 GOSUB 1190: GOSUB 1170
2230 FOR U = 1 TO A
2240 IF M(U) = 1 THEN 2260
2250 NEXT: RETURN
2260 PRINT A$(U); "....."
2270 GOSUB 1190: GOSUB 1170
2280 M(U) = 0: GOTO 2250
2290 REM END
2300 GOSUB 1190: GOSUB 1170
2310 PRINT "POINT A TO POINT B"
2320 GOSUB 1190: GOSUB 1170
2330 PRINT "TERMINATED...."
2340 GOSUB 1190: GOSUB 1170
2350 END
